home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Icon / c / GetSelect < prev    next >
Text File  |  1995-07-08  |  1KB  |  33 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Icon.c.GetSelect
  12.     Author:  Copyright © 1993 Philip Colmer
  13.     Version: 1.00 (14 Jul 1993)
  14.     Purpose: Returns the selection status of an icon
  15. */
  16.  
  17. #include "DeskLib:Wimp.h"
  18. #include "DeskLib:WimpSWIs.h"
  19. #include "DeskLib:Icon.h"
  20.  
  21.  
  22. extern BOOL Icon_GetSelect(window_handle window, icon_handle icon)
  23. /* This is a very inefficient function to use if you want to use the
  24.  * icon state data for anything else, but if you only want to know
  25.  * if the icon is selected, it's much more convenient
  26.  */
  27. {
  28.   icon_block istate;
  29.  
  30.   Wimp_GetIconState(window, icon, &istate);
  31.   return(istate.flags.data.selected);
  32. }
  33.